
import http from '@/utils/request'
const URL = '/breed/dovecoteEntryBill';

// 获取主体表格数据
export function getAllInfoByPage(pageNum = 1, pageSize = 10,type,id) {
    return http({
      url:`${URL}/getAllEntryByIdAndType/${pageNum}/${pageSize}?baseId=${id}&type=${type}`,
        method: 'get',
    })
}

//提交入库单
export function AddOrder(data) {
    return http({
        url:`${URL}/submitDovecoteEntryBill`,
        method: 'post',
        data
    })
}

//通过id删除订单
export function deleteOrder(id) {
    return http({
    url: `${URL}/delete/${id}`,
    method:'delete'
  })
}

// 通过id查询订单详细
export function showEidtRequest(data) {
  return http({
      url: `/breed/dovecoteEntryBase/get`,
      method: 'post',
      data
  })
}

// 通过id展示订单信息
export function showOrder(id) {
  return http({
  url: `${URL}/get/${id}`,
  method:'get'
})
}

// 通过id修改订单
export function EidtRequest(billId,data) {
  return http({
      url: `/breed/dovecoteEntryBill/update/?billId=${billId}`,
      method: 'post',
      data
  })
}

//根据日期查询数据
export function getByDateInfo(startTime,endTime,baseId) {
  return http({
      url:`${URL}/findBillByGmt_createAndBaseId/${startTime}/${endTime}/${baseId}`,
      method: 'get',
  })
}
